body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #2b2b2b;
    color: #f5f5f5;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
.sidebar {
    width: 100%;
    background-color: #1c1c1c;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-bottom: 1px solid #444;
}
.sidebar .menu-item {
    padding: 10px 0;
    width: 100%;
    text-align: center;
    color: #ddd;
    cursor: pointer;
    transition: background-color 0.3s;
}
.sidebar .menu-item:hover {
    background-color: #444;
}
.container {
    flex-grow: 1;
    padding: 5px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 80px;
}
.book-info, .chapters, .settings, .chapter-content, .search {
    display: none;
    flex-direction: column;
}
.book-info.active, .chapters.active, .settings.active, .chapter-content.active, .search.active {
    display: flex;
}
.book-info {
    font-size: 16px;
    margin-bottom: 20px;
    text-align: center;
}
.bookshelf {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    overflow-y: scroll;
    scrollbar-width: auto;
    height: 60%;
    padding-bottom: 10%;
}
.book-item {
    background-color: #1e1e1e;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #444;
    cursor: pointer;
}
.book-item:hover {
    background-color: #2c2c2c;
}
.book-title {
    font-size: 16px;
    font-weight: bold;
}
.book-author, .book-read-time {
    font-size: 12px;
}
.chapters {
    font-size: 14px;
    margin-bottom: 80px;
    overflow-y: auto;
    flex-grow: 1;
    background-color: #1e1e1e;
    border-radius: 4px;
    padding: 10px;
    border: 1px solid #444;
}
.chapters p {
    margin: 0;
    padding: 10px;
    color: #ff5656;
    position: fixed;
    z-index: 100;
    background-color: black;
    width: 86%;
}
.chapters ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
.chapters li {
    cursor: pointer;
    padding: 10px;
    background-color: #2c2c2c;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.3s;
}
.chapters li:hover {
    background-color: #3c3c3c;
}
#chapter-list{
    margin-top: 48px;
}
.chapter-content {
    font-size: 1.5rem;
    border-radius: 4px;
    overflow-y: auto;
    line-height: 1.6;
}
.chapter-content p {
    margin-bottom: 5%;
    text-indent: 5%;
}
.chapter-content div {
    color: #bbb;
}
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}
.setting_div{
    margin-bottom: 10px;
}

.content-next-chapter_name {
    margin: 0;
    padding: 10px;
    color: #ff5656;
    position: fixed;
    z-index: 100;
    background-color: black;
    width: 90%;
    font-size: 12px;
}

.content-next-page{
    position: fixed;
    bottom: 0;
    width: 100%;
    height: /* 页脚的高度，例如40px */ 40px;
    background-color: #333; /* 页脚背景颜色 */
}

.content-next-page span{
    color: #ff5656; /* 文字颜色 */
    text-align: center; /* 文本居中 */
    padding: 10px 0; /* 上下内边距，可按需调整 */
    font-size: 14px;
    margin-left: 2%;
}

.chapter-content_div{
    min-height: calc(100% - 40px);
    margin-top: 10%;
    top: 0;
}

.search_div{
    text-align: center;
}

.footer {
    font-size: 1.5rem;
    text-align: center;
    color: #FF5722;
}

/* 响应式设计 */
@media (min-width:600px) {
    body {
        flex-direction: row;
    }
    .sidebar {
        width: 200px;
        flex-direction: column;
        border-bottom: none;
        border-right: 1px solid #444;
    }
    .sidebar .menu-item {
        padding: 10px 0;
        text-align: center;
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.loading-overlay .spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}